<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" >
    <meta charset="UTF-8">
    <title>用户管理</title>
    <!--dtree-->
    <link rel="stylesheet" href="/static/layui_ext/dtree/dtree.css">
    <link rel="stylesheet" href="/static/layui_ext/dtree/font/dtreefont.css">
    <link rel="stylesheet" type="text/css" href="/static/layui/css/layui.css" media="all">
    <script src="/static/layui/layui.js" type="text/javascript"></script>
    <script src="/static/js/jquery-3.4.1.min.js" type="text/javascript"></script>
    <script src="/static/js/user.js" type="text/javascript"></script>
</head>
<body>
<div class="layui-collapse">
    <div class="layui-colla-item">
        <h2 class="layui-colla-title">查询条件</h2>
        <div class="layui-colla-content layui-show">
            <!--查询区域-->
            <form class="layui-form layui-form-pane" action="">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">用户名</label>
                        <div class="layui-input-block">
                            <input type="text" name="userName" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">部门名</label>
                        <div class="layui-input-inline">
                            <input type="text" name="departmentName" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <!--<div class="layui-input-block">-->
                        <button class="layui-btn layui-btn-xs" lay-submit lay-filter="formDemo">立即提交</button>
                        <button type="reset" class="layui-btn layui-btn-xs layui-btn-primary">重置</button>
                    <!--</div>-->
                </div>
            </form>
        </div>
    </div>
</div>
<!-- 数据表格 -->
<table id="userInfos" lay-filter="user_operation"></table>
<!--头部工具栏-->
<script type="text/html" id="toolbarDemo">
    <div class="layui-btn-container">
        <button class="layui-btn layui-btn-sm" lay-event="dowmFile"><i class="layui-icon layui-icon-download-circle"></i>模板下载</button>
        <button class="layui-btn layui-btn-sm  layui-btn-normal" lay-event="getCheckFile"><i class="layui-icon layui-icon-file"></i>选择文件</button>
        <button class="layui-btn layui-btn-sm layui-btn-primary" lay-event="inserts"><i class="layui-icon layui-icon-upload-drag"></i>批量导入</button>
    </div>
</script>
<!--行工具栏-->
<script type="text/html" id="barDemo">
    <a class="layui-btn layui-btn-xs layui-btn-warm" lay-event="role"><i class="layui-icon layui-icon-username"></i>角色</a>
    <a class="layui-btn layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>重置</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"><i class="layui-icon layui-icon-delete"></i>删除</a>
</script>

</body>
    <script type="text/html" id="depTp">
        {{#  if(d.departmentId === 2){ }}
        <button class="layui-btn layui-btn-xs layui-btn-primary">运营部</button>
        {{#  } else if(d.departmentId === 3) { }}
        <button class="layui-btn layui-btn-xs  layui-btn-primary">研发部</button>
        {{#  } else { }}
        <button class="layui-btn layui-btn-xs">总部</button>
        {{#  } }}
    </script>
    <script type="text/html" id="userTypeTP">
        <input type="checkbox" name="userType" value="{{d.id}}" lay-skin="switch" lay-text="" lay-filter="userType" {{ d.userType == 1 ?  'checked' : '' }}>
    </script>
    <script type="text/html" id="userImgTp">
        <img src="http://{{d.userImg}}" style="width: 50px;height: 50px;"/>
    </script>
</html>
